package com.hg.observer;

/**
 * @Author: skh
 * @Date: 2018/10/29 10:25
 * @Description:
 */
public class Client {

    public static void main(String[] args) {
        Subject subject = new Subject();

        Observer1 observer1 = new Observer1();
        Observer2 observer2 = new Observer2();
        subject.addObserver(observer1);
        subject.addObserver(observer2);

        subject.setChanged();
        subject.notifyObserver();
    }
}
